#include "CListQuestion.h"

CListQuestion::CListQuestion() {
	//throw "Not yet implemented";
}

//------------------------------------------------------------------------------------------
void CListQuestion::addQuestion(CQuestion question)
{
    this->question.append(question);
}
//------------------------------------------------------------------------------------------

CQuestion CListQuestion::getQuestion(int n) const
{
    if (n < this->question.count())
	return this->question[n];
    return CQuestion();
}
//------------------------------------------------------------------------------------------
CQuestion& CListQuestion::operator[] (int n)
{
    return question[n];
}

//------------------------------------------------------------------------------------------
bool CListQuestion::delQuestion(int n)
{
    if (n < this->question.count())
    {
//        QDomNodeList domNodeList = this->domDocument.documentElement().childNodes();
//        this->domDocument.documentElement().removeChild(domNodeList.at(n));
        this->question.remove(n);
	return true;
    }
    return false;
}

int CListQuestion::count()
{
    return this->question.count();
}
//------------------------------------------------------------------------------------------
